package com.dfdchem.imd.kaiwu.manager;

import org.jetbrains.annotations.NotNull;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

/**
 * 添加测试标记头部
 * @author yqq
 */
public class TestInterceptor implements Interceptor {
    private static final String TAG = "AuthInterceptor";

    @Override
    public Response intercept(@NotNull Chain chain) throws IOException {
        Request newRequest = chain.request().newBuilder()
                .addHeader("IsTest", DataManager.getInstance().isTest().toString())
                .build();
        return chain.proceed(newRequest);
    }
}
